package jun.learn.spring.threadexecutor;

import org.springframework.core.task.TaskExecutor;

public class TaskExecutorSample {
	private TaskExecutor taskExecutor;

	public TaskExecutorSample(TaskExecutor taskExecutor) {
		super();
		this.taskExecutor = taskExecutor;
	}
	
	public void printMessage(){
		for(int i = 0; i < 100; i++){
			taskExecutor.execute(new MessagePrinterTask("print message----"+i));
		}
	}
}
